<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>后台管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="../../css/font.css">
		<link rel="stylesheet" href="../../css/xadmin.css">
		<script type="text/javascript" src="../../js/jquery-3.2.1.js"></script>
		<script type="text/javascript" src="../../lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="../../js/xadmin.js"></script>

	</head>

	<body>
		<div class="x-body">
			<form class="layui-form" lay-filter="formTest">
				<div class="layui-form-item">
					<label for="fixBillId" class="layui-form-label">
                  ID
              </label>
					<div class="layui-input-inline">
						<input type="text" id="fixBillId" name="fixBillId"      autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label for="state" class="layui-form-label">维修状态</label>
					<div class="layui-input-inline">
						<select name="option" lay-verify="required">
							<option value="0">未选择</option>
							<option value="1">待处理</option>
							<option value="2">处理中</option>
							<option value="3">已安排师傅</option>
							<option value="4">已完成</option>
							<option value="5">已撤销</option>
						</select>	
					</div>
				</div>
				<div class="layui-form-item">
					<label for="breakObject" class="layui-form-label"> 用户ID</label>
					<div class="layui-input-inline">
						<input type="text" id="userId" name="userId"     autocomplete="off" class="layui-input">
					</div>
				</div>
				<!-- <div class="layui-form-item">
					<label for="breakObject" class="layui-form-label"> 用户名</label>
					<div class="layui-input-inline">
						<input type="text" id="presonName" name="presonName"      autocomplete="off" class="layui-input">
					</div>
				</div> -->
				<div class="layui-form-item">
					<label for="breakObject" class="layui-form-label"> 物件</label>
					<div class="layui-input-inline">
						<input type="text" id="breakObject" name="breakObject"   autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label for="workerName" class="layui-form-label">维修人员</label>
					<div class="layui-input-inline">
						<input type="text" id="workerName" name="workerName"    autocomplete="off" class="layui-input">
					</div>

				</div>
				<div class="layui-form-item">
					<label for="" class="layui-form-label">申请时间    </label>
					<div class="layui-input-inline">
						<input type="text" id="startSendTime" name="startSendTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
					<div class="layui-input-inline" style="width: auto;">_</div>
					<div class="layui-input-inline">
						<input type="text" id="endSendTime" name="endSendTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
				</div>
				<div class="layui-form-item">
					<label for="" class="layui-form-label">接受时间     </label>
					<div class="layui-input-inline">
						<input type="text" id="startCheckTime" name="startCheckTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
					<div class="layui-input-inline" style="width: auto;">_</div>
					<div class="layui-input-inline">
						<input type="text" id="endCheckTime" name="endCheckTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
				</div>

				<div class="layui-form-item">
					<label for="" class="layui-form-label">完成时间</label>
					<div class="layui-input-inline">
						<input type="text" id="startFinishTime" name="startFinishTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
					<div class="layui-input-inline" style="width: auto;">_</div>
					<div class="layui-input-inline">
						<input type="text" id="endFinishTime" name="endFinishTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
				</div>
				<div class="layui-form-item">
					<label for="applyTime" class="layui-form-label"> 预约时间</label>
					<div class="layui-input-inline">
						<input type="text" id="applyTime" name="applyTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
					<div class="layui-input-inline" style="width: auto;">_</div>
					<div class="layui-input-inline">
						<input type="text" id="applyTime" name="applyTime" required="date" autocomplete="off" class="layui-input date-item">
					</div>
				</div>

				<div class="layui-form-item">
					<label for="L_repass" class="layui-form-label"></label>
					<button class="layui-btn" lay-filter="retrieval" lay-submit="">检索</button>
				</div>
			</form>
		</div>
		<script type="text/javascript">
			console.log("未完善")
			layui.use(['form', 'laydate'], function() {
				var form = layui.form;
				var laydate = layui.laydate;

				$('.date-item').each(function() {
					laydate.render({
						elem: this
					});
				});

				form.on('submit(retrieval)', function(data) {
					console.log(JSON.stringify(data.field))
					/*for(var key in data.field){
						console.log(key)
						console.log(data.field[key])
					}*/
					var param = data.field
					switch (param.option){
						case "0" : console.log("00"); break;
						case "1" : param.isCheck = 0 ; break;
						case "2" : param.isCheck = 1 ; param.isApply = 0 ; break;
						case "3" : param.isCheck = 1 ; param.isApply = 1 ; param.isFinish = 0 ; break;
						case "4" : param.isCheck = 1 ; param.isApply = 1 ; param.isFinish = 1 ; break;
						case "5" : param.enable = 2 ;
					}
					param.option = "";
					var param1 = "";
					$.each(param, function(i,t) {
						if(t!=null&&t!=undefined&&t.toString().trim()!=""){
							param1 += "&" + i + "=" + t ;
						}
					});
					console.log(param1.substr(1))
					x_admin_show('检索结果','./fix.html?'+param1.substr(1));
					return false;
				});
			});
		</script>

	</body>

</html>